<template>
	<div class="newse" :style="{'background-color': bgColor}">
		<div><van-tag color="#ECF5FF" :text-color="bgColor" v-if="!u2u">统考</van-tag> <span class="examTitle">九年级初中模拟考试</span></div>
		<div class="newsecontent">
			<div class="newseInfo">2020级 | 新高考 | 自定义</div>
			<div class="newsedate">考试时间：2023-11-10</div>
		</div>
		<div class="newseopt">
			<van-row justify="center" v-if="!u2u">
			  <van-col span="7"><svg-icon name="report" :size="16" :color="bgColor"/> 分析报告  </van-col>
			  <van-col span="8"><svg-icon name="test" :size="16" :color="bgColor"/>
			  <van-divider vertical style="float: left;margin-top: 16px;"/> 
					试卷讲评  
			  <van-divider vertical style="float: right;margin-top: 16px;"/>
			  </van-col>
			  <van-col span="7"><svg-icon name="chengjibang" :size="16" :color="bgColor"/> 成绩榜</van-col>
			</van-row>
			
			<!--统考用户看统考-->
			<van-row justify="center" v-else>
			  <van-col span="10"><svg-icon name="report" :size="16" :color="bgColor"/> 分析报告   <van-divider vertical style="float: right;margin-top: 16px;"/></van-col>
			  <van-col span="10"><svg-icon name="chengjibang" :size="16" :color="bgColor"/> 成绩榜</van-col>
			</van-row>
		</div>
	</div>
</template>
<script lang="ts" setup>
	import { computed, ref, onMounted, onUpdated, onUnmounted } from 'vue'
	const props = defineProps<{
	  examType: number;//考试类型
	  schoolReport: boolean;//是否是学校报告
	}>();
	const bgColor = computed(() => {
		if(props.examType!=0){
			return '#E6A23C'
		}
		return "#4088FF";
	});
	const u2u = computed(() => props.examType!=0 &&!props.schoolReport);//统考用户看统考
</script>
<style>
.newse{
	background-color: #4088FF;
	border-radius: 4px;
	padding: 10px 8px;
}
.examTitle{
	color: #fff;
	font-weight: bold;
	font-size: 18px;
}
.newsecontent{
	background-color: #ECF5FF;
	border-radius: 4px 4px 0 0;
	margin-top: 10px;
	padding: 10px;
}
.newseopt{
	background-color:#fff ;
	height: 44px;
	line-height: 44px;
	text-align:center;
	vertical-align: middle;
	font-size: 14px;
	font-weight: bold;
}
.newseInfo{
	font-size: 16px;
	font-weight: 400;
}
.newsedate{
	margin-top: 10px;
	font-size: 14px;
	color: rgba(144, 147, 153, 1);
}
</style>